from django.conf import settings
from djopping_user.forms import LoginForm

def login_form(request):
    next = request.META['PATH_INFO']
    referer = request.META.get('HTTP_REFERER', '').replace('http://' + request.META['HTTP_HOST'], '')
    if not request.user.is_authenticated():
        login_form = LoginForm()
    else:
        login_form = None
    return { 'login_form': login_form, 'next': next, 'referer': referer }

